package com.dayuanit.dy16.pay.alipayspringbootautoconfiguation.config;

public class AlipayOrderResult {
    private boolean success;
    private String message;
    private String amount;
    private String orderId;

    private AlipayOrderResult() {}

    public AlipayOrderResult(boolean success) {
        this.success = success;
    }

    public AlipayOrderResult(boolean success, String message) {
        this.success = success;
        this.message = message;
    }

    public AlipayOrderResult(String amount, String orderId) {
        this.success = true;
        this.amount = amount;
        this.orderId = orderId;
    }

    public static AlipayOrderResult success(String amount, String orderId) {
        return new AlipayOrderResult(amount, orderId);
    }

    public static AlipayOrderResult fail(String message) {
        return new AlipayOrderResult(false, message);
    }

    public boolean isSuccess() {
        return success;
    }

    public String getMessage() {
        return message;
    }

    public String getAmount() {
        return amount;
    }

    public String getOrderId() {
        return orderId;
    }
}
